package com.lins.framework.http.api;

import com.lins.framework.http.HttpResult;
import com.lins.framework.ui.home.product.ProductListBean;
import com.lins.framework.ui.home.product.TopBannerBean;

import java.util.ArrayList;

import okhttp3.ResponseBody;
import retrofit2.http.GET;
import retrofit2.http.POST;
import retrofit2.http.Query;
import retrofit2.http.Streaming;
import retrofit2.http.Url;
import rx.Observable;

/**
 * Created by Admin on 2017/3/14.
 */

public interface LinsApi {
    @POST("cgi-goods-getGoodsList.html")
    Observable<HttpResult<ProductListBean>> getProductList(@Query("catid") int catid);

    @POST("/cgi-adv-getadvlist.html")
    Observable<HttpResult<ArrayList<TopBannerBean>>> getTopBanner(@Query("catid") int cattid);

    //文件下载
    @Streaming
    @GET
    Observable<ResponseBody> download(@Url String url);
}
